#pragma once
//#ifdef a
//顺序表复习实现

//初始化/尾插/扩容/尾删/查空/查容量/查有效数据数量/打印/头删/头插/pos删除/pos插入

#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
typedef int TYPE;

typedef struct SqlistList {
	TYPE* array;
	size_t size;//有效数据
	size_t capacity;//容量空间
}SqList;


extern void Sqlist_Init(SqList* ps, int put_capacity);//初始化
extern void Check_capacity(SqList* ps);//检查容量
extern int Check_NULL(SqList* ps);//查空
extern void SqList_In_Back(SqList* ps, int data);//尾插
extern void SqList_Del_Back(SqList* ps);//尾删
extern void SqList_In_Head(SqList* ps, int data);//头插
extern void SqList_Del_Head(SqList* ps);//头删
extern void SqList_Print(SqList* ps);//打印
extern size_t SqList_Size(SqList* ps);//有效节点数量
extern size_t SqList_Capacity(SqList* ps);//容量
extern void SqList_In_Pos(SqList* ps, int pos, int data);//任意位置下标插入
extern void SqList_Del_Pos(SqList* ps, int pos);//任意位置删除
extern int SqList_Search(SqList* ps, int data);////顺序表查找(成功返回下标，失败返回-1)
extern void SqList_Del(SqList* ps);//顺序表销毁
//#endif 